package com.jy.api.dao;

import com.jy.api.domain.Num;
import com.jy.api.domain.NumStatus;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

/**
 * Created by xiaohua on 2019/2/18.
 */
public interface NumDao extends CrudRepository<Num,Integer>{

    Page<Num> findAllByStoreIdAndEnabled(String storeId, boolean enabled,Pageable pageable);




    List<Num> findAllByPartitionIdAndEnabledOrderBySortDesc(int parId,boolean enabled);


    List<Num> findAllByPartitionIdAndStatusAndEnabledOrderBySortDesc(int parId, NumStatus numStatus, boolean enabled);

    List<Num>findAllByStoreIdAndEnabledAndStatusOrderBySortDesc(String storeId,boolean enabled,NumStatus status);


    List<Num>findAllByStoreIdAndEnabledOrderBySortDesc(String storeId,boolean enableds);

}
